<template>
  <v-container fluid>
    <v-row align="center">
      <v-col class="d-flex" cols="12" sm="6">
        <v-combobox
          v-model="select"
          class="box"
          :items="items"
          label="质检查询"
          outlined
          dense
          @change="changeItem(select)"
        ></v-combobox>
      </v-col>
    </v-row>
  </v-container>
</template>

<script>
import DocumentService from '@/services/document.service'
export default {
  data() {
    return {
      select: '',
      items: ['未质检', '已驳回', '已合格']
    }
  },
  methods: {
    async changeItem(item) {
      const data = await DocumentService.getQualityItems({
        projectId: this.$route.params.id,
        qualityStatus: this.items.indexOf(item)
      })
      console.log(data)
      this.$emit('changeResult', [data.data.results, data.data.count])
    }
  }
}
</script>

<style scoped>
.box {
  transform: translateY(10px);
}
</style>
